<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>ecma6</title>
	<link rel="stylesheet" href="">
</head>
<body>
	<script type="text/javascript">
		class stu{
			constructor(name,age){
				this.name = name;
				this.age = age;
			}
			showName(){
				console.log(name);
			}
		}

		const s1 = new stu('lili',15);
		console.log('对象:' + s1.name + s1.age);
		console.log(s1.showName());
	</script>
</body>
</html>